<?
	include('chksession.php');
		include('conn.php');
	session_start();
   
     
	   $Can_Date= $_REQUEST['Can_Date'];
       $Pax_Name= $_REQUEST['Pax_Name'];
	   $No_of_Pax= $_REQUEST['No_of_Pax'];
	   $Airline= $_REQUEST['Airline'];
	   $Sector= $_REQUEST['Sector'];
	   $Net_Rate= $_REQUEST['Net_Rate'];
	   $Refund_Amt= $_REQUEST['Refund_Amt'];
	   $Refund_Date= $_REQUEST['Refund_Date'];
	   $Agent_Rate= $_REQUEST['Agent_Rate'];
	   $Agent_Ref_Amt = $_REQUEST['Agent_Ref_Amt'];
	   $Reference_Date = $_REQUEST['Reference_Date'];
	   $Comment = $_REQUEST['Comment'];
	   $enteredby = $_REQUEST['enteredby'];
	   $cantrndetid =$_REQUEST['cantrndetid'];
	  $aname = $_REQUEST['aname'];
	  
	  $sql4="select custid from customermast where custdesc ='".$aname."';";
		$res4=mysql_query($sql4);		
		//echo($sql4.$res4);
		while ($row = mysql_fetch_assoc($res4)) 			
			$agentid = $row["custid"];
		//echo $agentid;
	  
		$sql="update canceltrandetails set 
				Can_Date='".$Can_Date."',Pax_Name='".strtoupper($Pax_Name)."',No_of_Pax=".$No_of_Pax.",Airline='".strtoupper($Airline)."',
				Sector='".strtoupper($Sector)."',Net_Rate=".$Net_Rate.",Refund_Amt=".$Refund_Amt.",
				Refund_Date='".$Refund_Date."',Agent_Rate=".$Agent_Rate.",Agent_Ref_Amt='".$Agent_Ref_Amt."',
				Reference_Date='".$Reference_Date."',Comment='".$Comment."', enteredby='".strtoupper($enteredby)."',agentid='".$agentid."',entrydt=sysdate()	where status=0 and cantrndetid='".$cantrndetid."';";		
		// echo $sql."=>";
		// return;
		$res=mysql_query($sql);
		//echo($res);
		if($res)
		$msg='Record updated successfully...';					

?>